﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExamSystem.BLL;
using ExamSystem.Mdeol;
namespace ExamSystem.ht
{
    public partial class TQuestion_Info : System.Web.UI.Page
    {
        private TquestionBLL tb = new TquestionBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                try
                {
                    string tqid = Request.QueryString["id"];
                    if (!string.IsNullOrEmpty(tqid))
                    {
                        List<Tquestion> list = tb.selectquetionid(int.Parse(tqid));

                        if (list != null)
                        {
                            foreach (Tquestion t in list)
                            {
                                this.lbTkcName.InnerText = t.TkcId.TkcName;
                                this.lbTqType.InnerText = t.Tqtype;
                                this.lbTqScore.InnerText = t.TqScore + "";
                                this.lbTqName.InnerText = t.TqName;
                                this.lbTqA.InnerText = t.TqA;
                                this.lbTqB.InnerText = t.TqB;
                                this.lbTqC.InnerText = t.TqC;
                                this.lbTqD.InnerText = t.TqD;
                                this.lbTqAnswer.InnerText = t.TqAnswer;
                            }

                        }
                    }
                    else
                    {
                        util.FunHelper.LayerAlter(this, "id非法");
                    }

                }
                catch(Exception ex)
                {
                    util.FunHelper.LayerAlter(this, ex+"");
                }
               
                }
            }
        }

    }
